/*
 * File:    Get.java
 * Created: 06-Feb-2009
 * Version: $Id$
 *
 * COPYRIGHT (C) 2009, Bitgate Mobile, LLC.  All Rights Reserved.
 *
 * software@bitgatemobile.com
 */

package com.webplasm.render.tags.internal;

import java.util.Arrays;
import java.util.List;

import com.webplasm.context.RenderContext;
import com.webplasm.render.engine.RenderException;
import com.webplasm.render.tags.TagInterface;
import com.webplasm.render.tags.WrappedNode;

/**
 * This is an internal tag class that is used as a pre-processor.  It will execute any and all code within the
 * document tag, but it will not generate any output to the page.  Any procedures that are defined here, or any
 * variables that are populated with data will contain the data, it will simply suppress the output contained within
 * the tag.
 * 
 * @author kenji
 * @since Webplasm 1.0
 */
public class Document extends WrappedNode implements TagInterface {
	private static final String DESCRIPTION = "Document pre-processing tag, suppresses output of any renderable data.";
	
	public String getNamespace() {
		return "u";
	}

	/**
	 * The attributes are as follows:
	 * <p/>
	 * <table border="1">
	 * <tr><th>Name:</th>
	 *     <th>Role:</th></tr>
	 * <tr><td>gc</td>
	 *     <td>If set to &quot;true&quot; this will perform a system-wide garbage collect after processing.</td></tr>
	 * </table>
	 * 
	 * @return <code>List&lt;String&gt;</code> containing all known attributes.
	 */
	public List<String> getAttributes() {
		return Arrays.asList("gc");
	}
	
	public List<String> getManagedNodes() {
		return null;
	}

	public String getDescription() {
		return DESCRIPTION;
	}

	@Override
	public StringBuffer render(RenderContext rContext) throws RenderException {
		return new StringBuffer();
	}
}